package com.graduation.smartparkingplatform.Pojo;

import org.springframework.data.annotation.Id;
import org.springframework.data.redis.core.RedisHash;
import org.springframework.data.redis.core.index.Indexed;

@RedisHash("captcha")
public class Captcha {
  @Id private String id;
  @Indexed private String captchaIP;
  @Indexed private String captchaStr;

  public Captcha(String captchaIP, String captchaStr) {
    this.captchaIP = captchaIP;
    this.captchaStr = captchaStr;
  }

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getCaptchaIP() {
    return captchaIP;
  }

  public void setCaptchaIP(String captchaIP) {
    this.captchaIP = captchaIP;
  }

  public String getCaptchaStr() {
    return captchaStr;
  }

  public void setCaptchaStr(String captchaStr) {
    this.captchaStr = captchaStr;
  }

  @Override
  public String toString() {
    return "Captcha{"
        + "id='"
        + id
        + '\''
        + ", captchaIP='"
        + captchaIP
        + '\''
        + ", captchaStr='"
        + captchaStr
        + '\''
        + '}';
  }
}
